#pragma once
#ifndef _x_file_parser
#define _x_file_parser
#include <d3dx9.h>
#include <vector>
#include "includeHeaders.h"
#include "templates.h"

class CXFileParser
{
public:
	CXFileParser(const  char  XFileName[]);
	~CXFileParser(void);
	HRESULT getStatus(){return status;}
	std::vector<char *> getTemplateNames(){return templateNames;}
private:
	//functions and voids
	bool generateXFileTree();
	bool walkTree(ID3DXFileEnumObject * fileEnumObject);
	bool walkOnTree(ID3DXFileData * fileEnumObject);
	

	//attributes
	const char * x_file;
	ID3DXFile * pD3DXFile;
	HRESULT status;
	std::vector<char *> templateNames;
	char * name;
};


#endif